home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / vdl020d.zip / VXMS.DOC < prev   
Text File  |  1993-04-14  |  20KB  |  938 lines

  1. {
  2.  ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix Extended Memory Services Unit (VXMS)
  5.  Copyright 1991,92,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8.  ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  ────────  ────────  ────────────────────────────────────────────────────────
  14.  
  15.  mep       03/25/93  Merged with VMemLow XMS routines.
  16.  
  17.  lpg       03/15/93  Added Source Documentation
  18.  
  19.  mep       02/11/93  Cleaned up code for beta release
  20.  
  21.  jrt       02/08/93  Sync with beta 0.12 release
  22.  
  23.  lpg       12/27/92  Cleaned up Unit
  24.  
  25.  jrt       12/07/92  Sync with beta 0.11 release
  26.  
  27.  lpg       11/25/92  Debugged ASM Routines
  28.  
  29.  jrt       11/21/92  Sync with beta 0.08
  30.  
  31.  mep/lpg   11/18/92  First logged revision.
  32.  
  33.  ────────────────────────────────────────────────────────────────────────────
  34.  
  35. }
  36.  
  37.  
  38. Unit
  39.  
  40.   VXMS;
  41.  
  42.  
  43. Uses
  44.  
  45.   VTypes,
  46.   DOS;
  47.  
  48. {────────────────────────────────────────────────────────────────────────────}
  49.  
  50. Type
  51.  
  52.   TXMSError   = BYTE;
  53.  
  54.   TXMBHandle  = WORD;
  55.   TXMSHandleOfs  = LONGINT;
  56.  
  57.   TXMSHandle  = WORD;
  58.   PXMSHandle  = ^TXMSHandle;
  59.  
  60.   TXMSMoveData = RECORD
  61.     Count     : LONGINT;    { 32-bit, num bytes to trans }
  62.     Source    : TXMBHandle;
  63.     SourceOfs : TXMSHandleOfs;
  64.     Dest      : TXMBHandle;
  65.     DestOfs   : TXMSHandleOfs;
  66.   END;
  67.   PXMSMoveData = ^TXMSMoveData;
  68.  
  69. {────────────────────────────────────────────────────────────────────────────}
  70.  
  71. {----------}
  72. { XMS 2.0+ }
  73. {----------}
  74.  
  75. Function  VXMSErrorToStr(             Status       : BYTE       ) : STRING;
  76.  
  77. Function  VXMSInstalled                            : BOOLEAN;
  78.  
  79. Procedure VXMSGetHandleAddr;
  80.  
  81. Function  VXMSGetVersion                           : WORD;
  82.  
  83. Function  VXMMGetVersion                           : WORD;
  84.  
  85. Function  VHMAPresent                              : BOOLEAN;
  86.  
  87. Function  VHMANew                                  : TXMSError;
  88.  
  89. Function  VHMANewTSR(                 HMABytes     : WORD       ) : TXMSError;
  90.  
  91. Function  VHMADispose                              : TXMSError;
  92.  
  93. Function  VA20GlobalEnable                         : TXMSError;
  94.  
  95. Function  VA20GlobalDisable                        : TXMSError;
  96.  
  97. Function  VA20LocalEnable                          : TXMSError;
  98.  
  99. Function  VA20LocalDisable                         : TXMSError;
  100.  
  101. Function  VA20Query                                : TXMSError;
  102.  
  103. Function  VXMSGetFreeStat(        Var MaxBlock     : WORD;
  104.                                   Var TotalK       : WORD       ) : TXMSError;
  105.  
  106. Function  VXMSGetMaxBlock                          : WORD;
  107.  
  108. Function  VXMSGetTotalFreeK                        : WORD;
  109.  
  110. Function  VXMBNew(                    SizeInK      : WORD;
  111.                                   Var Handle       : TXMBHandle ) : TXMSError;
  112.  
  113. Function  VXMBDispose(                Handle       : TXMBHandle ) : TXMSError;
  114.  
  115. Function  VXMBMove(                   MoveData     : PXMSMoveData) : TXMSError;
  116.  
  117. Function  VXMBMoveBlock(              Count        : LONGINT;
  118.                                       Source       : TXMBHandle;
  119.                                       SourceOfs    : TXMSHandleOfs;
  120.                                       Dest         : TXMBHandle;
  121.                                       DestOfs      : TXMSHandleOfs ) : TXMSError;
  122.  
  123. Function  VXMBMoveMainToXMB(          Count        : WORD;
  124.                                       FromPtr      : POINTER;
  125.                                       ToHandle     : TXMBHandle;
  126.                                       ToOfs        : TXMSHandleOfs ) : TXMSError;
  127.  
  128. Function  VXMBMoveXMBToMain(          Count        : WORD;
  129.                                       ToPtr        : POINTER;
  130.                                       FromHandle   : TXMBHandle;
  131.                                       FromHandleOfs: TXMSHandleOfs ) : TXMSError;
  132.  
  133. Function  VXMBLock(                   Handle       : TXMBHandle ) : TXMSError;
  134.  
  135. Function  VXMBUnLock(                 Handle       : TXMBHandle ) : TXMSError;
  136.  
  137. Function  VXMBGetInfo(                Handle       : TXMBHandle;
  138.                                   Var LockCount    : BYTE;
  139.                                   Var FreeHandles  : BYTE;
  140.                                   Var SizeInK      : WORD       ) : TXMSError;
  141.  
  142. Function  VXMBResize(                 NewSizeK     : WORD;
  143.                                       Handle       : TXMBHandle ) : TXMSError;
  144.  
  145. Function  VUMBNew(                    SizeInPara   : WORD;
  146.                                   Var SegOfUMB     : WORD;
  147.                                   Var SizeAlloc    : WORD;
  148.                                   Var MaxAvail     : WORD       ) : TXMSError;
  149.  
  150. Function  VUMBDispose(                SegOfUMB     : WORD       ) : TXMSError;
  151.  
  152.  
  153. {────────────────────────────────────────────────────────────────────────────}
  154.  
  155. {---------}
  156. { XMS 3.0 }
  157. {---------}
  158.  
  159. Function  VUMBResize(                 SegOfUMB     : WORD;
  160.                                       NewSize      : WORD       ) : TXMSError;
  161.  
  162. Function  VXMSQueryFreeXM(        Var MaxBlock     : LONGINT;
  163.                                   Var HighByte     : LONGINT;
  164.                                   Var TotalK       : LONGINT    ) : TXMSError;
  165.  
  166. Function  VXMSNew(                    SizeInK      : LONGINT;
  167.                                   Var Handle       : TXMBHandle ) : TXMSError;
  168.  
  169. Function  VXMSGetInfo(                Handle       : TXMBHandle;
  170.                                   Var LockCount    : BYTE;
  171.                                   Var FreeHandles  : WORD;
  172.                                   Var SizeInK      : LONGINT    ) : TXMSError;
  173.  
  174. Function  VXMSReSize(                 Handle       : TXMBHandle;
  175.                                       NewSizeK     : LONGINT    ) : TXMSError;
  176.  
  177. {────────────────────────────────────────────────────────────────────────────}
  178.  
  179.  
  180. ──────────────────────────────────────────────────────────────────────────────
  181.  
  182.  
  183. [FUNCTION]
  184.  
  185. Function VXMSErrorToStr(                   Status    : BYTE       ) : STRING;
  186.  
  187. [PARAMETERS]
  188.  
  189. Status      XMS Status Code
  190.  
  191. [RETURNS]
  192.  
  193. XMS Text Error Message.
  194.  
  195. [DESCRIPTION]
  196.  
  197. Takes the XMS Error Code Value and converts it into a Text Message.
  198.  
  199. [SEE-ALSO]
  200.  
  201. [EXAMPLE]
  202.  
  203.  
  204. ──────────────────────────────────────────────────────────────────────────────
  205.  
  206.  
  207. [FUNCTION]
  208.  
  209. Function VXMSInstalled                               : BOOLEAN;
  210.  
  211. [PARAMETERS]
  212.  
  213. (None)
  214.  
  215. [RETURNS]
  216.  
  217. Whether XMS Services are Available (TRUE=Yes)
  218.  
  219. [DESCRIPTION]
  220.  
  221. Determines whether Extended Memory Services (XMS) are Available, and
  222. if so Reports TRUE, else FALSE.
  223.  
  224. [SEE-ALSO]
  225.  
  226. [EXAMPLE]
  227.  
  228.  
  229. ──────────────────────────────────────────────────────────────────────────────
  230.  
  231.  
  232. [FUNCTION]
  233.  
  234. Procedure VXMSGetHandleAddr;
  235.  
  236. [PARAMETERS]
  237.  
  238. (None)
  239.  
  240. [RETURNS]
  241.  
  242. (None)
  243.  
  244. [DESCRIPTION]
  245.  
  246. This function Gets the Extended Memory Services Address Handle and Stores
  247. it in a Unit Local Variable.
  248.  
  249. [SEE-ALSO]
  250.  
  251. [EXAMPLE]
  252.  
  253.  
  254. ──────────────────────────────────────────────────────────────────────────────
  255.  
  256.  
  257. [FUNCTION]
  258.  
  259. Function VXMSGetVersion                              : WORD;
  260.  
  261. [PARAMETERS]
  262.  
  263. (None)
  264.  
  265. [RETURNS]
  266.  
  267. The XMS Version Number
  268.  
  269. [DESCRIPTION]
  270.  
  271. Returns the Extended Memory Services (XMS) Version Number.  The High-Byte
  272. being the Major Version Number, and the Low-Byte being the Minor Version
  273. Number.
  274.  
  275. [SEE-ALSO]
  276.  
  277. [EXAMPLE]
  278.  
  279.  
  280. ──────────────────────────────────────────────────────────────────────────────
  281.  
  282.  
  283. [FUNCTION]
  284.  
  285. Function VXMMGetVersion                              : WORD;
  286.  
  287. [PARAMETERS]
  288.  
  289. (None)
  290.  
  291. [RETURNS]
  292.  
  293. The XMM Version Number
  294.  
  295. [DESCRIPTION]
  296.  
  297. Returns the Extended Memory Manager (XMM) Version Number.  The High-Byte
  298. being the Major Version Number, and the Low-Byte being the Minor Version
  299. Number.
  300.  
  301. [SEE-ALSO]
  302.  
  303. [EXAMPLE]
  304.  
  305.  
  306. ──────────────────────────────────────────────────────────────────────────────
  307.  
  308.  
  309. [FUNCTION]
  310.  
  311. Function VHMAPresent                                 : BOOLEAN;
  312.  
  313. [PARAMETERS]
  314.  
  315. (None)
  316.  
  317. [RETURNS]
  318.  
  319. Whether HMA Support is Available (TRUE=Yes)
  320.  
  321. [DESCRIPTION]
  322.  
  323. Determines whether High Memory Address (HMA) Support is Available, and
  324. if so Reports TRUE, otherwise FALSE.
  325.  
  326. [SEE-ALSO]
  327.  
  328. [EXAMPLE]
  329.  
  330.  
  331. ──────────────────────────────────────────────────────────────────────────────
  332.  
  333.  
  334. [FUNCTION]
  335.  
  336. Function VHMANew                                     : TXMSError;
  337.  
  338. [PARAMETERS]
  339.  
  340. (None)
  341.  
  342. [RETURNS]
  343.  
  344. HMA Error Code (0=Success)
  345.  
  346. [DESCRIPTION]
  347.  
  348. This function allocates memory in High Memory Address (HMA).
  349.  
  350. This is a use Only for Non-TSR Programs.  A TSR cannot use this Routine
  351. to Allocate HMA Memory.  It should use the VHMANewTSR Routine.
  352.  
  353. [SEE-ALSO]
  354.  
  355. [EXAMPLE]
  356.  
  357.  
  358. ──────────────────────────────────────────────────────────────────────────────
  359.  
  360.  
  361. [FUNCTION]
  362.  
  363. Function VHMANewTSR(                       HMABytes  : WORD       ) : TXMSError;
  364.  
  365. [PARAMETERS]
  366.  
  367. HMABytes    Number of Bytes in HMA to Allocate
  368.  
  369. [RETURNS]
  370.  
  371. HMA Error Code (0=Success)
  372.  
  373. [DESCRIPTION]
  374.  
  375. This is a Special Routine Just to TSRs.  A TSR cannot use the Normal HMA
  376. Allocation Functions, and neither should a Normal Program use this Routine.
  377.  
  378. This function allocated Memory in High Memory Address (HMA).
  379.  
  380. [SEE-ALSO]
  381.  
  382. [EXAMPLE]
  383.  
  384.  
  385. ──────────────────────────────────────────────────────────────────────────────
  386.  
  387.  
  388. [FUNCTION]
  389.  
  390. Function VHMADispose                                 : TXMSError;
  391.  
  392. [PARAMETERS]
  393.  
  394. (None)
  395.  
  396. [RETURNS]
  397.  
  398. HMA Error Code (0=Success)
  399.  
  400. [DESCRIPTION]
  401.  
  402. Frees memory associate with the High Memory Address.
  403.  
  404. [SEE-ALSO]
  405.  
  406. [EXAMPLE]
  407.  
  408.  
  409. ──────────────────────────────────────────────────────────────────────────────
  410.  
  411.  
  412. [FUNCTION]
  413.  
  414. Function VA20GlobalEnable                            : TXMSError;
  415.  
  416. [PARAMETERS]
  417.  
  418. (None)
  419.  
  420. [RETURNS]
  421.  
  422. Whether the Global A20 Memory Line is Enabled.
  423.  
  424. [DESCRIPTION]
  425.  
  426. Determines and Reports whether the Global A20 Memory Line is Enabled.
  427.  
  428. [SEE-ALSO]
  429.  
  430. [EXAMPLE]
  431.  
  432.  
  433. ──────────────────────────────────────────────────────────────────────────────
  434.  
  435.  
  436. [FUNCTION]
  437.  
  438. Function VA20GlobalDisable                           : TXMSError;
  439.  
  440. [PARAMETERS]
  441.  
  442. (None)
  443.  
  444. [RETURNS]
  445.  
  446. Whether the Global A20 Memory Line is Disabled.
  447.  
  448. [DESCRIPTION]
  449.  
  450. Determines and Reports whether the Global A20 Memory Line is Disabled.
  451.  
  452. [SEE-ALSO]
  453.  
  454. [EXAMPLE]
  455.  
  456.  
  457. ──────────────────────────────────────────────────────────────────────────────
  458.  
  459.  
  460. [FUNCTION]
  461.  
  462. Function VA20LocalEnable                             : TXMSError;
  463.  
  464. [PARAMETERS]
  465.  
  466. (None)
  467.  
  468. [RETURNS]
  469.  
  470. Whether the Local A20 Memory Line is Enabled.
  471.  
  472. [DESCRIPTION]
  473.  
  474. Determines and Reports whether the Local A20 Memory Line is Enabled.
  475.  
  476. [SEE-ALSO]
  477.  
  478. [EXAMPLE]
  479.  
  480.  
  481. ──────────────────────────────────────────────────────────────────────────────
  482.  
  483.  
  484. [FUNCTION]
  485.  
  486. Function VA20LocalDisable                            : TXMSError;
  487.  
  488. [PARAMETERS]
  489.  
  490. (None)
  491.  
  492. [RETURNS]
  493.  
  494. Whether the Local A20 Memory Line is Disabled.
  495.  
  496. [DESCRIPTION]
  497.  
  498. Determines and Reports whether the Local A20 Memory Line is Disabled.
  499.  
  500. [SEE-ALSO]
  501.  
  502. [EXAMPLE]
  503.  
  504.  
  505. ──────────────────────────────────────────────────────────────────────────────
  506.  
  507.  
  508. [FUNCTION]
  509.  
  510. Function VA20Query                                   : TXMSError;
  511.  
  512. [PARAMETERS]
  513.  
  514. (None)
  515.  
  516. [RETURNS]
  517.  
  518. Whether the A20 Memory Line Query is Enabled.
  519.  
  520. [DESCRIPTION]
  521.  
  522. Determines and Reports whether the A20 Memory Line Query is Enabled.
  523. Note that a query action is only true if function returns no error -
  524. this assumes line disabled if error.
  525.  
  526. [SEE-ALSO]
  527.  
  528. [EXAMPLE]
  529.  
  530.  
  531. ──────────────────────────────────────────────────────────────────────────────
  532.  
  533.  
  534. [FUNCTION]
  535.  
  536. Function VXMSGetFreeStat(          Var MaxBlock      : WORD;
  537.                                    Var TotalK        : WORD       ) : TXMSError;
  538.  
  539. [PARAMETERS]
  540.  
  541. MaxBlock    VAR Returned Largest Available XMS Block
  542. TotalK      VAR Returned Total XMS Size in KiloBytes
  543.  
  544. [RETURNS]
  545.  
  546. Function : XMS Error Code (0=Success)
  547. (VAR     : [MaxBlock] Largest Available XMS Block)
  548. (VAR     : [TotalK] Total XMS Size in KiloBytes)
  549.  
  550. [DESCRIPTION]
  551.  
  552. Returns both the Largest Available Extended Memory Service (XMS) Block
  553. but also the Total Size of the XMS in KiloBytes.
  554.  
  555. [SEE-ALSO]
  556.  
  557. [EXAMPLE]
  558.  
  559.  
  560. ──────────────────────────────────────────────────────────────────────────────
  561.  
  562.  
  563. [FUNCTION]
  564.  
  565. Function VXMSGetMaxBlock                             : WORD;
  566.  
  567. [PARAMETERS]
  568.  
  569. (None)
  570.  
  571. [RETURNS]
  572.  
  573. Largest XMS Block Available
  574.  
  575. [DESCRIPTION]
  576.  
  577. Returns the Largest Available Extended Memory Service (XMS) Block.
  578. Value is in KiloBytes.
  579.  
  580. [SEE-ALSO]
  581.  
  582. [EXAMPLE]
  583.  
  584.  
  585. ──────────────────────────────────────────────────────────────────────────────
  586.  
  587.  
  588. [FUNCTION]
  589.  
  590. Function VXMSGetTotalFreeK                           : WORD;
  591.  
  592. [PARAMETERS]
  593.  
  594. (None)
  595.  
  596. [RETURNS]
  597.  
  598. Total Free K of XMS Memory
  599.  
  600. [DESCRIPTION]
  601.  
  602. Returns the Total Number of Free KiloBytes of Extended Memory Service (XMS)
  603. Memory.
  604.  
  605. [SEE-ALSO]
  606.  
  607. [EXAMPLE]
  608.  
  609.  
  610. ──────────────────────────────────────────────────────────────────────────────
  611.  
  612.  
  613. [FUNCTION]
  614.  
  615. Function VXMBNew(                      SizeInK       : WORD;
  616.                                    Var Handle        : TXMBHandle ) : TXMSError;
  617.  
  618. [PARAMETERS]
  619.  
  620. SizeInK     Desired XMB Memory Allocation in KiloBytes
  621. Handle      VAR Returned XMB Memory Handle
  622.  
  623. [RETURNS]
  624.  
  625. Function : XMB Error Code (0=Success)
  626. (VAR     : [Handle] XMB Memory Handle)
  627.  
  628. [DESCRIPTION]
  629.  
  630. Allocates memory to an XMB Memory Handle
  631.  
  632. [SEE-ALSO]
  633.  
  634. [EXAMPLE]
  635.  
  636.  
  637. ──────────────────────────────────────────────────────────────────────────────
  638.  
  639.  
  640. [FUNCTION]
  641.  
  642. Function VXMBDispose(                  Handle        : TXMBHandle ) : TXMSError;
  643.  
  644. [PARAMETERS]
  645.  
  646. Handle      Handle to XMB Memory
  647.  
  648. [RETURNS]
  649.  
  650. XMB Error Code (0=Success)
  651.  
  652. [DESCRIPTION]
  653.  
  654. Frees memory associated with a previous allocated XMB Handle.
  655.  
  656. [SEE-ALSO]
  657.  
  658. [EXAMPLE]
  659.  
  660.  
  661. ──────────────────────────────────────────────────────────────────────────────
  662.  
  663.  
  664. [FUNCTION]
  665.  
  666. Function VXMBMove(                     MoveData      : PXMSMoveData) : TXMSError;
  667.  
  668. [PARAMETERS]
  669.  
  670. MoveData    Pointer to XMB Move Data Structure
  671.  
  672. [RETURNS]
  673.  
  674. XMB Error Code (0=Succes)
  675.  
  676. [DESCRIPTION]
  677.  
  678. Takes the XMB Move Data Structure and Moves the Data Accordingly.
  679.  
  680. Use XMBMoveBlock to Load the XMB Move Data Structure.
  681.  
  682. [SEE-ALSO]
  683.  
  684. [EXAMPLE]
  685.  
  686.  
  687. ──────────────────────────────────────────────────────────────────────────────
  688.  
  689.  
  690. [FUNCTION]
  691.  
  692. Function VXMBMoveBlock(                Count         : LONGINT;
  693.                                        Source        : TXMBHandle;
  694.                                        SourceOfs     : TXMSHandleOfs;
  695.                                        Dest          : TXMBHandle;
  696.                                        DestOfs       : TXMSHandleOfs ) : TXMSError;
  697.  
  698. [PARAMETERS]
  699.  
  700. Count       Number of Bytes to Move
  701. Source      Source Address/Handle of Move Data
  702. SourceOfs   Source Address/Handle Offset of Move Data
  703. Dest        Destination Address/Handle of Move Data
  704. DestOfs     Destination Address/Handle Offset of Move Data
  705.  
  706. [RETURNS]
  707.  
  708. XMB Error Code (0=Success)
  709.  
  710. [DESCRIPTION]
  711.  
  712. Moves a Block of Memory from the Source Address/XMB Handle to the
  713. Destination Address/XMB Handle.  It is NOT Intended as a means of
  714. Moving Main Memory Data to Main Memory but rather a means of moving
  715. Data to/from XMB Memory.
  716.  
  717. [SEE-ALSO]
  718.  
  719. [EXAMPLE]
  720.  
  721.  
  722. ──────────────────────────────────────────────────────────────────────────────
  723.  
  724.  
  725. [FUNCTION]
  726.  
  727. Function VXMBMoveMainToXMB(            Count         : WORD;
  728.                                        FromPtr       : POINTER;
  729.                                        ToHandle      : TXMBHandle;
  730.                                        ToOfs         : TXMSHandleOfs ) : TXMSError;
  731.  
  732. [PARAMETERS]
  733.  
  734. Count       Number of Bytes to Move To XMB
  735. FromPtr     Pointer to Source of Moving Data
  736. ToHandle    Destination XMB Handle
  737. ToHandleOfs Destination XMB Offset
  738.  
  739. [RETURNS]
  740.  
  741. XMB Error Code (0=Success)
  742.  
  743. [DESCRIPTION]
  744.  
  745. Moves a Block of Data from Main Memory (below 640K) to XMB Memory.
  746.  
  747. [SEE-ALSO]
  748.  
  749. [EXAMPLE]
  750.  
  751.  
  752. ──────────────────────────────────────────────────────────────────────────────
  753.  
  754.  
  755. [FUNCTION]
  756.  
  757. Function VXMBMoveXMBToMain(            Count         : WORD;
  758.                                        ToPtr         : POINTER;
  759.                                        FromHandle    : TXMBHandle;
  760.                                        FromHandleOfs : TXMSHandleOfs ) : TXMSError;
  761.  
  762. [PARAMETERS]
  763.  
  764. Count         Number of Bytes to Move From XMB
  765. ToPtr         Pointer to Destination of Moved XMB Data
  766. FromHandle    Source XMB Handle
  767. FromHandleOfs Source XMB Handle Offset
  768.  
  769. [RETURNS]
  770.  
  771. XMB Error Code
  772.  
  773. [DESCRIPTION]
  774.  
  775. Moves a Block of Data from XMB Memory to Main Memory (below 640K).
  776.  
  777. [SEE-ALSO]
  778.  
  779. [EXAMPLE]
  780.  
  781.  
  782. ──────────────────────────────────────────────────────────────────────────────
  783.  
  784.  
  785. [FUNCTION]
  786.  
  787. Function VXMBLock(                     Handle        : TXMBHandle ) : TXMSError;
  788.  
  789. [PARAMETERS]
  790.  
  791. Handle      XMB Handle to Lock
  792.  
  793. [RETURNS]
  794.  
  795. XMB Error Code (0=Success)
  796.  
  797. [DESCRIPTION]
  798.  
  799. [SEE-ALSO]
  800.  
  801. [EXAMPLE]
  802.  
  803.  
  804. ──────────────────────────────────────────────────────────────────────────────
  805.  
  806.  
  807. [FUNCTION]
  808.  
  809. Function VXMBUnLock(                   Handle        : TXMBHandle ) : TXMSError;
  810.  
  811. [PARAMETERS]
  812.  
  813. Handle      XMB Handle to UnLock
  814.  
  815. [RETURNS]
  816.  
  817. XMB Error Code (0=Success)
  818.  
  819. [DESCRIPTION]
  820.  
  821. [SEE-ALSO]
  822.  
  823. [EXAMPLE]
  824.  
  825.  
  826. ──────────────────────────────────────────────────────────────────────────────
  827.  
  828.  
  829. [FUNCTION]
  830.  
  831. Function VXMBGetInfo(                  Handle        : TXMBHandle;
  832.                                    Var LockCount     : BYTE;
  833.                                    Var FreeHandles   : BYTE;
  834.                                    Var SizeInK       : WORD       ) : TXMSError;
  835.  
  836. [PARAMETERS]
  837.  
  838. Handle      XMB Handle
  839. LockCount   VAR Returned Number of XMB Locks
  840. FreeHandles VAR Returned Number of Free XMB Handles
  841. SizeInK     VAR Returned XMB Handle Memory Allocation
  842.  
  843. [RETURNS]
  844.  
  845. Function : XMB Error Code
  846. (VAR     : [LockCount] Number of XMB Locks)
  847. (VAR     : [FreeHandles] Number of Free XMB Handles)
  848. (VAR     : [SizeInK] XMB Handle Memory Allocation)
  849.  
  850. [DESCRIPTION]
  851.  
  852. [SEE-ALSO]
  853.  
  854. [EXAMPLE]
  855.  
  856.  
  857. ──────────────────────────────────────────────────────────────────────────────
  858.  
  859.  
  860. [FUNCTION]
  861.  
  862. Function VXMBReSize(                   NewSizeK      : WORD;
  863.                                        Handle        : TXMBHandle ) : TXMSError;
  864.  
  865. [PARAMETERS]
  866.  
  867. NewSizeK    New XMB Allocation for XMB Handle
  868. Handle      Pre-Allocated Handle to XMB Memory
  869.  
  870. [RETURNS]
  871.  
  872. XMB Error Code (0=Success)
  873.  
  874. [DESCRIPTION]
  875.  
  876. [SEE-ALSO]
  877.  
  878. [EXAMPLE]
  879.  
  880.  
  881. ──────────────────────────────────────────────────────────────────────────────
  882.  
  883.  
  884. [FUNCTION]
  885.  
  886. Function VUMBNew(                      SizeInPara    : WORD;
  887.                                    Var SegOfUMB      : WORD;
  888.                                    Var SizeAlloc     : WORD;
  889.                                    Var MaxAvail      : WORD       ) : TXMSError;
  890.  
  891. [PARAMETERS]
  892.  
  893. SizeInPara  Size of Desired UMB Allocation in Paragraphs
  894. SegOfUMB    VAR Returned Segment of UMB
  895. SizeAlloc   VAR Returned Size Allocation
  896. MaxAvail    VAR Returned Maximum UMB Space Available
  897.  
  898. [RETURNS]
  899.  
  900. Function : UMB Error Code (0=Success)
  901. (VAR     : [SegOfUMB] Segment of UMB)
  902. (VAR     : [SizeAlloc] Size Allocation)
  903. (VAR     : [MaxAvail] Maximum UMB Space Available)
  904.  
  905. [DESCRIPTION]
  906.  
  907. Allocates an Upper Memory Block (UMB) of a Specified Number of Paragraphs.
  908. And Returns the Memory Allocation Information or an Error Code.  Note that
  909. MaxAvail is valid only if allocation error - if no error, it will be set
  910. to $FFFF.
  911.  
  912. [SEE-ALSO]
  913.  
  914. [EXAMPLE]
  915.  
  916.  
  917. ──────────────────────────────────────────────────────────────────────────────
  918.  
  919.  
  920. [FUNCTION]
  921.  
  922. Function VUMBDispose(                  SegOfUMB      : WORD       ) : TXMSError;
  923.  
  924. [PARAMETERS]
  925.  
  926. SegOfUMB    Segment Address of UMB
  927.  
  928. [RETURNS]
  929.  
  930. UMB Error Code (0=Success)
  931.  
  932. [DESCRIPTION]
  933.  
  934. [SEE-ALSO]
  935.  
  936. [EXAMPLE]
  937.  
  938.